# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libblockdev
pkgver=2.26
pkgrel=1
pkgdesc="A library for manipulating block devices"
arch=('x86_64')
url="https://github.com/rhinstaller/libblockdev"
license=('LGPL')
depends=('btrfs-progs' 'dosfstools' 'dmraid' 'gptfdisk' 'libbytesize' 'lvm2' 'mdadm' 'ndctl'
         'parted' 'volume_key' 'xfsprogs' 'kmod' 'libyaml')
makedepends=('autoconf-archive' 'gobject-introspection' 'systemd' 'python')
source=("$pkgname-$pkgver.tar.gz::https://github.com/rhinstaller/libblockdev/archive/$pkgver-1.tar.gz")
sha512sums=('662f9b6a03933a7192079dd2826f87e8465a5a2d792c8768a4cb241cc8adecf04d7558a082bec7cd83ac9cddb3121362ce9cd5eecc73a91ac3ea517e5911a7ed')

build() {
  cd "$srcdir"/$pkgname-$pkgver-1
  ./autogen.sh
  ./configure --prefix=/usr --sysconfdir=/etc --without-lvm_dbus
  make
}

check() {
  cd "$srcdir"/$pkgname-$pkgver-1
  make check
}

package() {
  cd "$srcdir"/$pkgname-$pkgver-1
  make DESTDIR="$pkgdir" install
}
